<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml"
      xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>日志页面</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
          name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--插件样式-->
    <link rel="stylesheet" href="/dist/plugins/select2/select2.min.css">
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=39cd89cd">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=16f1e6f3">
    <style>
        .table > tbody > tr > td {
            line-height: 24px;
            max-height: 24px;
            overflow: hidden;
        }

        span.lineOne {
            line-height: 28px;
            height: 28px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
        }

        .div-td-content-more {
            height: auto;
            line-height: 20px;
            background-color: #d3e8fd;
            padding: 8px 6px;
            border: 1px solid #e8e8ea;
        }
        .divCheck{
            height: 100%;
            margin-left: 5px;
            line-height: 25px;
        }
        .divCheck input{
            float: left;
            margin-top: 7px;
            margin-right: 5px;
        }
        .div-td-content-more i {
            width: 15px;
            height: 12px;
            background: url("/dist/img/more-icon.png");
            position: absolute;
            left: 50px;
            top: -12px;
        }
        .table > thead > tr > th{
            background: #d3e8fd !important;
            color: black !important;
        }
        .jiaobiao3 {
            position: relative;
        }

        .jiaobiao3 i {
            display: block;
            width: 6px;
            height: 6px;
            background: url("/dist/img/newLog3.png");
            position: absolute;
            top: 0px;
            right: 0px;
        }
        .moreListData .item{
            width: 100%;
            height: 30px;
            line-height: 30px;
        }
        .moreListData .item span{
            margin-right: 5px;
        }
        .ui_main{
            vertical-align: top;
        }
    </style>
</head>
<body>
<section class="content" id="app" v-cloak>
    <div class="div-td-content-more"><i></i></div>
    <template v-if="type=='1'">
        <table class="table table-hover table-bordered text-center table-striped">
            <thead>
            <tr>
                <th>修改内容</th>
                <th style="width: 60px;">修改人</th>
                <th style="width: 130px;">修改时间</th>
            </tr>
            </thead>
            <tbody>
            <tr v-for="(item,i) in list">
                <td>{{item.newValue}}</td>
                <td>{{item.updateUserName}}</td>
                <td>{{item.updateTime}}</td>
            </tr>
            </tbody>
        </table>
    </template>
    <template v-else>
        <table class="table table-hover table-bordered text-center table-striped">
            <thead>
            <tr>
                <th>修改内容</th>
                <th style="width: 60px;">修改人</th>
                <th style="width: 130px;">修改时间</th>
            </tr>
            </thead>
            <tbody>
            <tr v-for="(item,i) in listSon">
                <td>{{item.oldValue}}</td>
                <td>{{item.updateUserName}}</td>
                <td>{{item.updateTime}}</td>
            </tr>
            </tbody>
        </table>
    </template>
    </div>

</section>
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=7e54a132"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=558d0414"></script>
<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script type="text/javascript" src="/dist/plugins/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script>
    var app = new Vue({
        el:"#app",
        data:{
            tableName:$.wyui.page.urlParams.tableName,
            column:$.wyui.page.urlParams.column,
            columnName:$.wyui.page.urlParams.columnName,
            mainKey:$.wyui.page.urlParams.mainKey,
            mid:$.wyui.page.urlParams.mid,
            type:$.wyui.page.urlParams.type,
            id:$.wyui.page.urlParams.id,
            list:[],
            listSon:[]
        },
        methods:{
            //获取日志
//            getMoreHistory:function () {
//                var that=this;
//                $(".moreList").each(function() {
//                    console.log($(this));
//                    var demo = $(this);
//                    var tableName = $(this).attr("data-table");
//                    var type = $(this).attr("data-type");
//
//                })
//            },
        },
        mounted:function () {
            var that=this;
            if(that.type=='1'){
                $.wyui.postMethod(urlConfig.logs.getColumnLogs, {
                    "tableName":that.tableName,
                    "columnName":that.column,
                    "updateId":that.id
                }, function (data) {
                    console.log(data)
                    that.list = data;
                })
            }
            else if(that.type=="2"){
                $.wyui.postMethod(urlConfig.logs.getTableLogs, {
                    "tableName":that.tableName,
                    "columnName":that.columnName,
                    "mainKey":that.mainKey,
                    "id":that.mid
                }, function (data) {
                    console.log(data)
                    that.listSon = data;
                })
            }
        }
    })
</script>
</body>
</html>